﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FoundationLib.Ifc.Attributes
{
	/// <summary>
	/// Attribute for enumeration members defining their display name (friendly name).
	/// </summary>
	[AttributeUsage(AttributeTargets.Field, Inherited = false, AllowMultiple = true)]
	public class EnumDisplayNameAttribute : Attribute
	{
		/// <summary>
		/// The display name
		/// </summary>
		private string displayName;
		/// <summary>
		/// The category
		/// </summary>
		private string category;


		/// <summary>
		/// Creates a new <see cref="EnumDisplayNameAttribute"/>.
		/// </summary>
		/// <param name="displayName">The display name</param>
		public EnumDisplayNameAttribute(string displayName)
		{
			this.displayName = displayName;
		}

		/// <summary>
		/// Creates a new <see cref="EnumDisplayNameAttribute"/>.
		/// </summary>
		/// <param name="category">The category</param>
		/// <param name="displayName">The display name</param>
		public EnumDisplayNameAttribute(string category, string displayName)
			: this(displayName)
		{
			this.category = category;
		}

		/// <summary>
		/// Gets the enumeration field display name.
		/// </summary>
		public string DisplayName
		{
			get
			{
				return this.displayName;
			}
		}

		/// <summary>
		/// Gets or sets the category.
		/// </summary>
		public string Category
		{
			get
			{
				return this.category;
			}
			set
			{
				this.category = value;
			}
		}
	}
}
